package org.zlb.manager.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * TODO
 *
 * @author zhoulingbo
 * @date 2021/8/10 12:30
 */
@Entity
@Table(name = "org_operator", schema = "admin", catalog = "")
public class OrgOperator {
    private String operatorCode;
    private String operatorPass;
    private String operatorPassSalt;
    private byte operatorStatus;
    private byte operatorType;
    private String operatorName;
    private Long operatorAvatar;
    private String operatorDept;
    private String operatorDeptAll;
    private String operatorRole;
    private String operatorMobile;
    private String operatorEmail;
    private String operatorIp;
    private String operatorParam;
    private Timestamp operatorCreated;
    private Timestamp operatorModified;

    @Id
    @Column(name = "OPERATOR_CODE")
    public String getOperatorCode() {
        return operatorCode;
    }

    public void setOperatorCode(String operatorCode) {
        this.operatorCode = operatorCode;
    }

    @Basic
    @Column(name = "OPERATOR_PASS")
    public String getOperatorPass() {
        return operatorPass;
    }

    public void setOperatorPass(String operatorPass) {
        this.operatorPass = operatorPass;
    }

    @Basic
    @Column(name = "OPERATOR_PASS_SALT")
    public String getOperatorPassSalt() {
        return operatorPassSalt;
    }

    public void setOperatorPassSalt(String operatorPassSalt) {
        this.operatorPassSalt = operatorPassSalt;
    }

    @Basic
    @Column(name = "OPERATOR_STATUS")
    public byte getOperatorStatus() {
        return operatorStatus;
    }

    public void setOperatorStatus(byte operatorStatus) {
        this.operatorStatus = operatorStatus;
    }

    @Basic
    @Column(name = "OPERATOR_TYPE")
    public byte getOperatorType() {
        return operatorType;
    }

    public void setOperatorType(byte operatorType) {
        this.operatorType = operatorType;
    }

    @Basic
    @Column(name = "OPERATOR_NAME")
    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    @Basic
    @Column(name = "OPERATOR_AVATAR")
    public Long getOperatorAvatar() {
        return operatorAvatar;
    }

    public void setOperatorAvatar(Long operatorAvatar) {
        this.operatorAvatar = operatorAvatar;
    }

    @Basic
    @Column(name = "OPERATOR_DEPT")
    public String getOperatorDept() {
        return operatorDept;
    }

    public void setOperatorDept(String operatorDept) {
        this.operatorDept = operatorDept;
    }

    @Basic
    @Column(name = "OPERATOR_DEPT_ALL")
    public String getOperatorDeptAll() {
        return operatorDeptAll;
    }

    public void setOperatorDeptAll(String operatorDeptAll) {
        this.operatorDeptAll = operatorDeptAll;
    }

    @Basic
    @Column(name = "OPERATOR_ROLE")
    public String getOperatorRole() {
        return operatorRole;
    }

    public void setOperatorRole(String operatorRole) {
        this.operatorRole = operatorRole;
    }

    @Basic
    @Column(name = "OPERATOR_MOBILE")
    public String getOperatorMobile() {
        return operatorMobile;
    }

    public void setOperatorMobile(String operatorMobile) {
        this.operatorMobile = operatorMobile;
    }

    @Basic
    @Column(name = "OPERATOR_EMAIL")
    public String getOperatorEmail() {
        return operatorEmail;
    }

    public void setOperatorEmail(String operatorEmail) {
        this.operatorEmail = operatorEmail;
    }

    @Basic
    @Column(name = "OPERATOR_IP")
    public String getOperatorIp() {
        return operatorIp;
    }

    public void setOperatorIp(String operatorIp) {
        this.operatorIp = operatorIp;
    }

    @Basic
    @Column(name = "OPERATOR_PARAM")
    public String getOperatorParam() {
        return operatorParam;
    }

    public void setOperatorParam(String operatorParam) {
        this.operatorParam = operatorParam;
    }

    @Basic
    @Column(name = "OPERATOR_CREATED")
    public Timestamp getOperatorCreated() {
        return operatorCreated;
    }

    public void setOperatorCreated(Timestamp operatorCreated) {
        this.operatorCreated = operatorCreated;
    }

    @Basic
    @Column(name = "OPERATOR_MODIFIED")
    public Timestamp getOperatorModified() {
        return operatorModified;
    }

    public void setOperatorModified(Timestamp operatorModified) {
        this.operatorModified = operatorModified;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrgOperator that = (OrgOperator) o;
        return operatorStatus == that.operatorStatus &&
                operatorType == that.operatorType &&
                Objects.equals(operatorCode, that.operatorCode) &&
                Objects.equals(operatorPass, that.operatorPass) &&
                Objects.equals(operatorPassSalt, that.operatorPassSalt) &&
                Objects.equals(operatorAvatar, that.operatorAvatar) &&
                Objects.equals(operatorDept, that.operatorDept) &&
                Objects.equals(operatorDeptAll, that.operatorDeptAll) &&
                Objects.equals(operatorRole, that.operatorRole) &&
                Objects.equals(operatorMobile, that.operatorMobile) &&
                Objects.equals(operatorEmail, that.operatorEmail) &&
                Objects.equals(operatorIp, that.operatorIp) &&
                Objects.equals(operatorParam, that.operatorParam) &&
                Objects.equals(operatorCreated, that.operatorCreated) &&
                Objects.equals(operatorModified, that.operatorModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(operatorCode, operatorPass, operatorPassSalt, operatorStatus, operatorType, operatorAvatar, operatorDept, operatorDeptAll, operatorRole, operatorMobile, operatorEmail, operatorIp, operatorParam, operatorCreated, operatorModified);
    }
}
